package com.zhongxi.guoyuan.entity.seller;

import org.json.JSONArray;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/12/21.
 */

public class SellerBeautifulOrderData {

    private String id;
    private String userid;
    private String sid;
    private String ssid;
    private String servicename;
    private String shouldinnerprice;
    private String shouldprice;
    private String payinnerprice;
    private String pay;
    private String servicetime;
    private String serviceimg;
    private String sstype;
    private String ctime;
    private int backsilverratio;

    public int getBacksilverratio() {
        return backsilverratio;
    }

    public void setBacksilverratio(int backsilverratio) {
        this.backsilverratio = backsilverratio;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public String getSid() {
        return sid;
    }

    public void setSid(String sid) {
        this.sid = sid;
    }

    public String getSsid() {
        return ssid;
    }

    public void setSsid(String ssid) {
        this.ssid = ssid;
    }

    public String getServicename() {
        return servicename;
    }

    public void setServicename(String servicename) {
        this.servicename = servicename;
    }

    public String getShouldinnerprice() {
        return shouldinnerprice;
    }

    public void setShouldinnerprice(String shouldinnerprice) {
        this.shouldinnerprice = shouldinnerprice;
    }

    public String getShouldprice() {
        return shouldprice;
    }

    public void setShouldprice(String shouldprice) {
        this.shouldprice = shouldprice;
    }

    public String getPayinnerprice() {
        return payinnerprice;
    }

    public void setPayinnerprice(String payinnerprice) {
        this.payinnerprice = payinnerprice;
    }

    public String getPay() {
        return pay;
    }

    public void setPay(String pay) {
        this.pay = pay;
    }

    public String getServicetime() {
        return servicetime;
    }

    public void setServicetime(String servicetime) {
        this.servicetime = servicetime;
    }

    public String getServiceimg() {
        return serviceimg;
    }

    public void setServiceimg(String serviceimg) {
        this.serviceimg = serviceimg;
    }

    public String getSstype() {
        return sstype;
    }

    public void setSstype(String sstype) {
        this.sstype = sstype;
    }

    public String getCtime() {
        return ctime;
    }

    public void setCtime(String ctime) {
        this.ctime = ctime;
    }

    public static List<SellerBeautifulOrderData> parseMatch(JSONArray ary) {
        List<SellerBeautifulOrderData> list = new ArrayList<SellerBeautifulOrderData>();
        try{
            SellerBeautifulOrderData info;
            for(int i=0; i<ary.length();i++){
                info = new SellerBeautifulOrderData();
                JSONObject obj = ary.getJSONObject(i);
                info.setId(obj.getString("id"));
                info.setUserid(obj.getString("userid"));
                info.setSid(obj.getString("sid"));
                info.setSsid(obj.getString("ssid"));
                info.setServicename(obj.getString("servicename"));
                info.setShouldinnerprice(obj.getString("shouldinnerprice"));
                info.setShouldprice(obj.getString("shouldprice"));
                info.setPayinnerprice(obj.getString("payinnerprice"));
                info.setPay(obj.getString("pay"));
                info.setServicetime(obj.getString("servicetime"));
                info.setServiceimg(obj.getString("serviceimg"));
                info.setSstype(obj.getString("sstype"));
                info.setCtime(obj.getString("ctime"));
                list.add(info);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
        return list;
    }
}
